package com.gxa.pingan.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

/**
 * 这是订单的主表
 * 订单的其他内容分成了4个表来分别存储,通过id关联
 * @author YXQ
 * @date 2021/10/25 14:50
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("订单主表的实体类")
public class Order implements Serializable {
    /**
     * 订单编号,数据库自增
     */
    @ApiModelProperty(name = "id",value = "id",dataType = "Long",hidden = true)
    private Long id;
    /**
     * 订单的编号,后台uuid生成
     */
    @ApiModelProperty(name = "orderNum",value = "orderNum",dataType = "String",hidden = true)
    private String orderNum;
    /**
     * 订单类型
     */
    @ApiModelProperty(name = "type",value = "type",example = "预约理赔服务(下拉列表的value)",dataType = "String",required = true)
    private String type;
    /**
     * 用户名
     */
    @ApiModelProperty(name = "name",value = "name",example = "严晓其",dataType = "String",required = true)
    private String name;
    /**
     * 城市
     */
    @ApiModelProperty(name = "city",value = "city",example = "北京",dataType = "String")
    private String city;
    /**
     * 订单来源
     */
    @ApiModelProperty(name = "orderSource",value = "orderSource",example = "后台/用户/XX保险(第三方)",dataType = "String",required = true)
    private String orderSource;
    /**
     * 联系电话("用户电话")
     */
    @ApiModelProperty(name = "phone",value = "phone",example = "15583750208",dataType = "String",required = true)
    private String phone;
    /**
     * 车牌号
     */
    @ApiModelProperty(name = "carNum",value = "carNum",example = "GK12001",dataType = "String",required = true)
    private String carNum;
    /**
     * 司机姓名
     */
    @ApiModelProperty(name = "driverName",value = "driverName",example = "严大其",dataType = "String",required = true)
    private String driverName;
    /**
     * 是否还车
     */
    @ApiModelProperty(name = "isReturnCar",value = "isReturnCar",example = "0/1",dataType = "Boolean")
    private Boolean isReturnCar;
    /**
     * 还车司机
     */
    @ApiModelProperty(name = "retDriver",value = "retDriver",example = "严小其",dataType = "String")
    private String retDriver;
    /**
     * 订单状态
     */
    @ApiModelProperty(name = "orderType",value = "orderType",example = "待付款",dataType = "String")
    private String orderType;
    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "payTime",value = "payTime",example = "下单时间2021-10-25 15:53:03",dataType = "Timestamp")
    private Timestamp payTime;
    /**
     * 付款状态
     */
    @ApiModelProperty(name = "payType",value = "payType",example = "待付款",dataType = "String")
    private String payType;
    /**
     * 派工单位
     */
    @ApiModelProperty(name = "dispatchUnit",value = "dispatchUnit",example = "XX公司",dataType = "String")
    private String dispatchUnit;
    /**
     * 4S店
     */
    @ApiModelProperty(name = "hopFours",value = "hopFours",example = "北京晓晓4S店",dataType = "String")
    private String hopFours;
    /**
     * 接车时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "pickUpTime",value = "pickUpTime",example = "2021-10-25 15:53:03",dataType = "Timestamp",required = true)
    private Timestamp pickUpTime;
    /**
     * 接车地址
     */
    @ApiModelProperty(name = "pickUpAddress",value = "pickUpAddress",example = "北京三颗松",dataType = "String",required = true)
    private String pickUpAddress;
    /**
     * 发动机号
     */
    @ApiModelProperty(name = "engineNum",value = "engineNum",example = "CFBX04332",dataType = "String",required = true)
    private String engineNum;
    /**
     * 拍照内容
     */
    @ApiModelProperty(name = "takePicturesContent",value = "takePicturesContent",example = "前挡风玻璃/后视镜",dataType = "String")
    private String takePicturesContent;
    /**
     * 客户备注
     */
    @ApiModelProperty(name = "customerRemarks",value = "customerRemarks",example = "需要赔付服务,请求快速到达现场,谢谢",dataType = "String",required = true)
    private String customerRemarks;
    /**
     * 是否发送短信
     */
    @ApiModelProperty(name = "whetherToTextOrNot",value = "whetherToTextOrNot",dataType = "Boolean",required = true)
    private Boolean whetherToTextOrNot;
    /**
     * 检测场
     */
    @ApiModelProperty(name = "detection",value = "detection",example = "北京高级检测公司",dataType = "String")
    private String detection;
    /**
     * 取证地点
     */
    @ApiModelProperty(name = "obtainLocation",value = "取证地点",dataType = "String")
    private String obtainLocation;
    /**
     * 取证时间
     */
    @ApiModelProperty(name = "obtainTime",value = "取证时间",dataType = "Timestamp")
    private Timestamp obtainTime;
    /**
     * 取证司机
     */
    @ApiModelProperty(name = "orderDriver",value = "取证司机",dataType = "String")
    private String orderDriver;
    /**
     * 为一对一查询准备的实体
     */
    private OrderOther orderOther = new OrderOther();
    /**
     * 为一对一查询准备的实体
     */
    private OrderPay orderPay = new OrderPay();
    /**
     * 为一对一查询准备的实体
     */
    private OrderMessage orderMessage = new OrderMessage();
    /**
     * 为一对多查询准备的一个集合
     */
    private List<OrderImg> imgList = new ArrayList<>();
}
